<!--
/*********************************************************************************
 * SugarCRM Community Edition is a customer relationship management program developed by
 * SugarCRM, Inc. Copyright (C) 2004-2013 SugarCRM Inc.
 * 
 * This program is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License version 3 as published by the
 * Free Software Foundation with the addition of the following permission added
 * to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK
 * IN WHICH THE COPYRIGHT IS OWNED BY SUGARCRM, SUGARCRM DISCLAIMS THE WARRANTY
 * OF NON INFRINGEMENT OF THIRD PARTY RIGHTS.
 * 
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 * 
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 * 
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 * 
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo. If the display of the logo is not reasonably feasible for
 * technical reasons, the Appropriate Legal Notices must display the words
 * "Powered by SugarCRM".
 ********************************************************************************/

/*********************************************************************************

 * Description:
 ********************************************************************************/
-->

<!-- BEGIN: main -->
<div id="leads_check_list">
<script type="text/javascript">
	function handleClick0(e) {  
	    var index = EditView_tabs.get('activeIndex');
	    //alert(e.active);
	    //alert(index); 
	    $("#Leads_detailview_tabs").show();
	    $("#leads_check_list").hide();
	    
	}	
	function handleClick1(e) {  
	    var index = EditView_tabs.get('activeIndex');
	    //alert(e.active);
	    //alert(index); 
	   	$("#Leads_detailview_tabs").hide();
	   	$("#leads_check_list").show();
   	
	}	
	var EditView_tabs = new YAHOO.widget.TabView("actionsContainer");
	EditView_tabs.on('contentReady', function(e){
			var tab = new YAHOO.widget.Tab({
				label: 'Lead detail view',
				cacheData: true,
				active:true,
			});
		tab.addListener('click', handleClick0);
		EditView_tabs.addTab(tab);

			var tab = new YAHOO.widget.Tab({
				label: 'Check list',
				cacheData: true,
				active:false
			});
		tab.addListener('click', handleClick1);
		EditView_tabs.addTab(tab);
		$("#leads_check_list").hide();
		load();
	});
	function handleStatus(sel) { 
		var text = 'Sales_Stage_';
		var id =  "tr[id^='"+text+"']";
		$(id).css( "display", "none" );
		text = text + sel.value;
		id =  "tr[id^='"+text+"']";
		$(id).css( "display", "table-row" );
	}

	function load() { 
		var text = 'Sales_Stage_';
		var id =  "tr[id^='"+text+"']";
		$(id).css( "display", "none" );
		text = text + $("#status").val();
		id =  "tr[id^='"+text+"']";
		$(id).css( "display", "table-row" );
	}
	

</script>

<style type="text/css">
.bottom {
    border-bottom: 1px solid rgb(171, 195, 215) !important
}
.top {
    border-top: 1px solid rgb(171, 195, 215) !important
}
.left {
    border-left: 1px solid rgb(171, 195, 215) !important
}
.right {
    border-right: 1px solid rgb(171, 195, 215) !important
}
</style>
{ERROR_STRING}
{ROLLOVER}
<form name="DetailView" id="DetailView" method="POST">
	<input type="hidden" name="module" value="Leads">
	<input type="hidden" name="record" value="{ID}">
	<input type="hidden" name="action">
	<input type="hidden" name="return_module" value="Leads">
	<input type="hidden" name="return_id" value="{RETURN_ID}">
	<input type="hidden" name="return_action" value="{RETURN_ACTION}">
	<input type="hidden" name="use_adv" id="use_adv">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td>
			<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.use_adv.value='Checklist';this.form.action.value='{RETURN_ACTION}'; return check_form('DetailView')" type="submit" name="button" value="  {APP.LBL_SAVE_BUTTON_LABEL}  " >
			<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.use_adv.value=null;this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value="  {APP.LBL_CANCEL_BUTTON_LABEL}  ">
			<input title="{MOD.LBL_Export_to_Excel}" class="button" onclick="this.form.use_adv.value='excel';this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value="  {MOD.LBL_Export_to_Excel}  ">
		</td>
		<td align="right" nowrap><span class="required">{APP.LBL_REQUIRED_SYMBOL}</span> {APP.NTC_REQUIRED}</td>
		<td align='right'>{ADMIN_EDIT}</td>
	</tr>
</table>
<!-- BEGIN: table -->
<table cellspacing="0" cellpadding="0" border="0" class="list view" width="50%" id="Leads_Check_List">
	<tr>
		<td class="bottom" scope="row" width = "50%"><slot>{MOD.LBL_Current_Stage}</slot></td>
		<td class="bottom left" width = "50%"><slot>{STATUS}</slot></td>
	</tr>

	<tr>
		<td  scope="row" ><slot>{MOD.LBL_SALES_STAGE} <span class="required">{APP.LBL_REQUIRED_SYMBOL}</span></slot></td>
		<td class="left"><slot><select name='status' id='status' style="width: 200px" onchange="handleStatus(this);">{STATUS_OPTIONS}</select></slot></td>
	</tr>
	<tr>
		<th >
			<h4>{MOD.LBL_Checklist_Description}</h4>
		</th>
		<th class="left">
			<h4>{MOD.LBL_Response}</h4>
		</th>
	</tr>
	<!-- BEGIN: row -->
	<tr height="20"  id="Sales_Stage_{data.Sales_Stage}_{data.id}">
		<td valign=TOP class="bottom left"><slot>{data.Checklist_Item_Desc}</slot></td>
	  	<td align="left" valign=TOP class="bottom left"><slot>{Checklist_Response}</slot></td>
	</tr>
	<!-- END: row -->
</table>
<!-- END: table -->
<!-- BEGIN: table2 -->
	<table cellspacing="0" cellpadding="0" border="0" class="list view" width="50%">
			<tr>
				<th class="left" scope="row">
					<h4>{MOD.LBL_SALES_STAGE}</h4>
				</th>
				<th class="left" scope="row">
					<h4>{MOD.LBL_No_of_items}</h4>
				</th>
				<th class="left" scope="row">
					<h4>{MOD.LBL_No_of_items_updated}</h4>
				</th>
		</tr>
		<!-- BEGIN: row2 -->
		<tr height="20">
			<td  class="bottom left" scope="row"><slot>{sumary.Sales_Stage}</slot></td>
		  	<td  class="bottom left" scope="row"><slot>{sumary.No_of_items}</slot></td>
		  	<td  class="bottom left" scope="row"><slot>{sumary.No_of_items_updated}</slot></td>
		</tr>
		<!-- END: row2 -->
	</table>
	<!-- END: table2 -->

<div style="padding-top:2px;clear: both;">
			<input title="{APP.LBL_SAVE_BUTTON_TITLE}" accessKey="{APP.LBL_SAVE_BUTTON_KEY}" class="button" onclick="this.form.use_adv.value='Checklist';this.form.action.value='{RETURN_ACTION}'; return check_form('DetailView')" type="submit" name="button" value="  {APP.LBL_SAVE_BUTTON_LABEL}  " >
			<input title="{APP.LBL_CANCEL_BUTTON_TITLE}" accessKey="{APP.LBL_CANCEL_BUTTON_KEY}" class="button" onclick="this.form.use_adv.value=null;this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value="  {APP.LBL_CANCEL_BUTTON_LABEL}  ">
			<input title="{MOD.LBL_Export_to_Excel}" class="button" onclick="this.form.use_adv.value='excel';this.form.action.value='{RETURN_ACTION}'; this.form.module.value='{RETURN_MODULE}'; this.form.record.value='{RETURN_ID}'" type="submit" name="button" value="  {MOD.LBL_Export_to_Excel}  ">
</div>
</form>
{JAVASCRIPT}
</div>
<!-- END: main -->

